﻿using System.Collections.Generic;

namespace ATSSDK.Internal;

internal class OriginalStringComparer : IComparer<string>
{
    public int Compare(string? x, string? y)
    {
        if (x == null && y == null)
        {
            return 0;
        }
        if (x == null)
        {
            return -1;
        }
        if (y == null)
        {
            return 1;
        }
        return string.CompareOrdinal(x, y);
    }

    public static OriginalStringComparer Default { get; } = new OriginalStringComparer();
}